import java.util.Arrays;
import java.util.Random;

/**
 * @author: gao
 * @create-date: 2025/3/7 12:47
 */

public class Solution {

    public static void Order(int[] array) {
        for (int i = 0; i < array.length; i++) {
            array[i] = i;
        }
    }

    public static void ReverseOrder(int[] array) {
        for (int i = 0; i < array.length; i++) {
            array[i] = array.length - i;
        }
    }

    public static void DisOrder(int[] array) {
        Random ran = new Random();
        for (int i = 0; i < array.length; i++) {
            array[i] = ran.nextInt(array.length);
        }
    }

    public static void TestInsertSort(int[] array) {
        long StartTime = System.currentTimeMillis();
        Sort sort = new Sort();
        sort.InsertSort(array);
        long EndTIme = System.currentTimeMillis();
        System.out.println("直接插入排序耗时：" + (EndTIme - StartTime));
    }

    public static void main(String[] args) {
        int[] array = new int[10_000];
        ReverseOrder(array);
        TestInsertSort(array);
    }

    public static void main1(String[] args) {
        int[] array = {87, 5, 32, 55, 43, 26};
        Sort sort = new Sort();
        sort.InsertSort(array);
        System.out.println(Arrays.toString(array));
    }
}